﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WinBattle : BaseUI {

    

    public override void OnButtonClick(string btnName)
    {
        switch (btnName)
        {
            case "BtnReplay":
                var r=UIManager.EnterUI<UIBattle>();
                r.LoadInit(GameMain.Instance.currentProgress.ToString());
                UIManager.ExitUI(this);
                break;
            case "BtnSelect":
                UIManager.EnterUI<UISelect>();
                UIManager.ExitUI(this);
                break;
            case "BtnNext":
                if(GameMain.Instance.currentProgress<= GameMain.Instance.maxProgress)
                {
                    var n = UIManager.EnterUI<UIBattle>();
                    n.LoadInit((++GameMain.Instance.currentProgress).ToString());
                    UIManager.ExitUI(this);
                }
                else
                {
                    Debug.Log("已经通关了");
                }
                
                break;

            default:
                break;
        }
    }
}
